<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS回顾</title>
</head>
<body>

<script>
    var a = 10;
    var b = 1.1;
    var c = 'hello';
    var d = "hello";
    var e = true;
    var f = false;
    var g;
    console.log(a,typeof a);
    console.log(b,typeof b);
    console.log(c,typeof c);
    console.log(d,typeof d);
    console.log(e,typeof e);
    console.log(f,typeof f);
    console.log(g,typeof g);

    let obj = {};
    console.log(obj,typeof obj);
    obj.name='张三';
    console.log(obj,typeof obj,obj.name)
    let arr = [1,true,'hello'];
    console.log(arr,typeof arr);
    console.log(arr[0],arr[1],arr[99]);

    console.log(Number('23'),typeof Number('23'));
    console.log(Number(true),typeof Number(true));
    console.log(Number(false),typeof Number(false));
    console.log(Number('哈哈'),typeof Number('哈哈'));
    console.log(Number('7a'),typeof Number('7a'));

    console.log(Boolean(0));
    console.log(Boolean(null));
    console.log(Boolean(''));
    console.log(Boolean(NaN));
    console.log(Boolean(undefined));
    console.log(Boolean('   '))
    console.log(Boolean('上午'))

    let x = 1;
    let y = true;
    console.log(x == y);
    console.log(x === y);
    console.log(3 > 7);
    console.log(3 > '7');
    console.log('3' > 7);
    console.log('3' > '7');
    console.log('3'.charCodeAt());

</script>

</body>
</html>